<?php
namespace BP\GPM;
require_once("BP/En/Map.php");
class VGPMEmpMenu extends EntityMyPK {
	public function getCtrlObjs () 
	{
		return $this->GetValStringByKey(MenuAttr::$CtrlObjs);
	}
	public function setCtrlObjs ($value) // [String value]
	{
		$this->SetValByKey(MenuAttr::$CtrlObjs, $value);
	}
	public function getFK_Emp () 
	{
		return $this->GetValStringByKey(VGPMEmpMenuAttr::$FK_Emp);
	}
	public function setFK_Emp ($value) // [String value]
	{
		$this->SetValByKey(VGPMEmpMenuAttr::$FK_Emp, $value);
	}
	public function getFK_Menu () 
	{
		return $this->GetValStringByKey(VGPMEmpMenuAttr::$FK_Menu);
	}
	public function setFK_Menu ($value) // [String value]
	{
		$this->SetValByKey(VGPMEmpMenuAttr::$FK_Menu, $value);
	}
	public function getName () 
	{
		return $this->GetValStringByKey(MenuAttr::$Name);
	}
	public function setName ($value) // [String value]
	{
		$this->SetValByKey(MenuAttr::$Name, $value);
	}
	public function getHisMenuType () 
	{
		return MenuType->forValue($this->GetValIntByKey(MenuAttr::$MenuType));
	}
	public function setHisMenuType ($value) // [MenuType value]
	{
		$this->SetValByKey(MenuAttr::$MenuType, $value->getValue());
	}
	public function getMenuType () 
	{
		return $this->GetValIntByKey(MenuAttr::$MenuType);
	}
	public function setMenuType ($value) // [int value]
	{
		$this->SetValByKey(MenuAttr::$MenuType, $value);
	}
	public function getIdx () 
	{
		return $this->GetValIntByKey(MenuAttr::$Idx);
	}
	public function setIdx ($value) // [int value]
	{
		$this->SetValByKey(MenuAttr::$Idx, $value);
	}
	public function getFK_App () 
	{
		return $this->GetValStringByKey(MenuAttr::$FK_App);
	}
	public function setFK_App ($value) // [String value]
	{
		$this->SetValByKey(MenuAttr::$FK_App, $value);
	}
	public function getImg () 
	{
		$s = $this->GetValStringByKey("WebPath");
		if ($DataType->IsNullOrEmpty($s))
		{
			if (($this->getHisMenuType() == MenuType::$Dir))
			{
				return "../../Images/Btn/View.gif";
			}
			else
			{
				return "../../Images/Btn/Go.gif";
			}
		}
		else
		{
			return $s;
		}
	}
	public function getUrl () 
	{
		return $this->GetValStringByKey(MenuAttr::$Url);
	}
	public function setUrl ($value) // [String value]
	{
		$this->SetValByKey(MenuAttr::$Url, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($no) // [String no]
	{
		$me = new self();
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("V_GPM_EmpMenu");
		$map->setDepositaryOfEntity($Depositary->None);
		$map->setDepositaryOfMap($Depositary->Application);
		$map->setEnDesc("人员菜单对应");
		$map->setEnType($EnType->View);
		$map->AddMyPK();
		$map->AddTBString(VGPMEmpMenuAttr::$FK_Emp, NULL, "操作�?",  TRUE ,  FALSE , 0, 30, 20);
		$map->AddTBString(VGPMEmpMenuAttr::$FK_Menu, NULL, "菜单功能",  TRUE ,  FALSE , 0, 30, 20);
		$map->AddTBString(MenuAttr::$Name, NULL, "菜单功能-名称",  TRUE ,  FALSE , 0, 3900, 20);
		$map->AddTBString(MenuAttr::$ParentNo, NULL, "ParentNo",  TRUE ,  FALSE , 1, 30, 20);
		$map->AddTBString(AppAttr::$Url, NULL, "连接",  TRUE ,  FALSE , 0, 3900, 20,  TRUE );
		$map->AddDDLSysEnum(MenuAttr::$MenuType, 0, "菜单类型",  TRUE ,  TRUE , MenuAttr::$MenuType, "@3=目录@4=功能@5=功能控制�?");
		$map->AddTBString(MenuAttr::$FK_App, NULL, "系统",  TRUE ,  FALSE , 0, 30, 20);
		$map->AddMyFile("图标");
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
